package com.javademo.quenetest;

import lombok.extern.slf4j.Slf4j;

import java.util.LinkedList;
import java.util.NoSuchElementException;
import java.util.Queue;
import java.util.concurrent.ArrayBlockingQueue;

@Slf4j
public class QueueTest {
    public static void main(String[] args) {
        Queue<String> queue = new LinkedList<>();
        //inputTest(queue);
        try {
            log.info("queue.element() :{}",queue.peek());
        }catch (IllegalStateException | NoSuchElementException e){
            log.error("error",e);
        }
        log.info("queue:{}",queue);
    }

    private static void inputTest(Queue<String> queue){
        /*queue.offer("1");
        queue.offer("2");
        queue.offer("3");
        queue.offer("4");
        queue.offer("5");*/
    }
}
